#include"progressbar.h"

const char* label = "|/-\\";
void pg_bar()
{
    char bar[NUM] = {0};
    int cout = 0;
    int szlabel = strlen(label);
    while(cout <= 100)
    {
        printf("[%-100s][%d%%][%c]\r",bar,cout,label[cout%szlabel]);
        
        fflush(stdout);
        bar[cout++] = Style;
        if(cout > 0 && cout < 100)
        {
            bar[cout] = '>';
        }
        usleep(10000);
        
    }
    printf("\n");
}
